import axios from '@/utils/request'
// 获取员工列表
export const getEmployeeApi = (params) => {
  return axios({
    url: '/sys/user',
    params
  })
}
// 下载excel
export const downloadExcelApi = () => {
  return axios({
    url: '/sys/user/export',
    responseType: 'blob'
  })
}
// 下载excel模板
export const downloadTemplateApi = () => {
  return axios({
    url: '/sys/user/import/template',
    responseType: 'blob'
  })
}
// 上传文件
export const updataFileApi = (data) => {
  return axios({
    method: 'post',
    url: '/sys/user/import',
    data
  })
}
// 删除员工
export const delEmployeeApi = (id) => {
  return axios({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}
// 新增员工
export const addEmployeeApi = (data) => {
  return axios({
    method: 'post',
    url: '/sys/user',
    data
  })
}
// 查看信息
export const getuserInfoApi = (id) => {
  return axios({
    url: `/sys/user/${id}`
  })
}
